<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    .big {
        width: 400px;
        height: 300px;
        background-color: yellow;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .small{
        width: 100px;
        height: 100px;
        background-color: red;
    }

    </style>
</head>
<body>
    
    <div onclick="show('big')" class="big">
        <div onclick="show('sm')" class="small">小的</div>
    </div>

    <a onclick="mya()" href="https://baidu.com">去百度</a>

    <ul onclick="myul()">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
        <li>8</li>
        <li>9</li>
        <li>0</li>
    </ul>
</body>
</html>
<script>
function myul(){
    var obj =  event.srcElement;
    console.log( obj );
}

function mya(){
    alert('a标签')
    event.preventDefault(); //取消默认行为
}


function show(t){
   console.log( t );
   event.stopPropagation(); //阻止冒泡
}

</script>